﻿using aier.dataaccess.dapper;
using aier.dataaccess.model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace aier.business.logic
{
    public class ScreenItemBll
    {
        public ScreenItemDal screenItemDal { get; set; }

        public IEnumerable<ScreenItemView> GetScreenItemsByHospID(Guid hospitalId) {
            return screenItemDal.GetScreenItemsByHospID(hospitalId);
        }

        /// <summary>
        /// 获取所有筛查项目
        /// </summary>
        /// <returns></returns>
        public List<ScreenItemView> GetScreenAllTeams()
        {
            return screenItemDal.GetScreenAllTeams().ToList();
        }

        /// <summary>
        /// 根据筛查项目名称查询当前筛查项目
        /// 原程序使用：getScreenteam
        /// </summary>
        /// <param name="name">筛查项目名称</param>
        /// <param name="ownerid">负责人ID</param>
        /// <param name="statecode">状态０：可用,２:停用</param>
        /// <returns></returns>
        public IEnumerable<ScreenItemView> QueryScreenItem(string name, string ownerid, int statecode = 0)
        {
            return screenItemDal.QueryScreenItem(name, ownerid, statecode);
        }
    }
}
